 let currPage = 1;
 let flag = true;
 getList()
function getList() {
    $.ajax({
    url:'/list',
    data:{
        atmosphereImageUrl: null,
        cutPrice: 0,
        ad_id: 0,
       cost: 0,
       uid: 0,
        imgVersion: 3,
        isMain: false,
        isSPU: 0,
        productName: "斗罗大陆4 终极斗罗16 唐家三少",
        requestId: null,
       reviewCnt: 1,
       salePrice: 3200,
    },
    dataType:'json',
    success:function(res){
        console.log(res)
    }
})
}
bindHtml()
function bindHtml(list){
      let str = ''
      list.forEach(item => {
        str += `
          <li>
            <img src="${ item.verticalPic }" alt="">
            <span>${ item.name }</span>
            <h2>${ item.price }</h2>
          </li>
        `
      })
      $('.goodsList > ul').html(str)
    }

bindPagi()
function bindPagi(totalPage) {
      flag = false

      $('.pagi').pagination({
        pageCount: totalPage, 
        current: 1, 
        jump: true,
        coping: true,
        homePage: '首页', 
        endPage: '末页', 
        prevContent: '上页',
        nextContent: '下页',
        callback: function (api) { 
          currPage = api.getCurrent()
          getList()
        }
      })
    }